<template>
	<view class="body">
		<u-swiper :list="detail.pics" height="1300rpx"></u-swiper>
		<view class="">
			<view class="title p40 line">{{detail.name}}</view>
			<view>
				<view class="name p30">商品详情</view>
				<view class="detail mt20">
					<dp :pagecontent="pagecontent"></dp>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				id: 0,
				detail: {},
				pagecontent: ''
			}
		},
		methods: {
			getDetail() {
				app.get('ApiShop/product', { id: this.id }, (res) => {
					// console.log(res);
					if (res.status == 1) {
						this.detail = res.product
						this.pagecontent = JSON.parse(res.product.detail)
					}
				})
			},
			jump(url) {
				app.goto(url)
			},
		},
		onLoad(options) {
			this.id = options.id
			this.getDetail()
		}
	}
</script>

<style scoped lang="scss">

</style>